package com.ymttest.database.mapping.godmch;

import com.ymttest.database.model.godmch.interactionstate;
import com.ymttest.database.model.godmch.interactionstateExample;
import com.ymttest.database.model.godmch.interactionstateKey;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface interactionstateMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table interactionstate
     *
     * @mbggenerated Tue Mar 17 17:54:34 CST 2020
     */
    @SelectProvider(type=interactionstateSqlProvider.class, method="countByExample")
    int countByExample(interactionstateExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table interactionstate
     *
     * @mbggenerated Tue Mar 17 17:54:34 CST 2020
     */
    @DeleteProvider(type=interactionstateSqlProvider.class, method="deleteByExample")
    int deleteByExample(interactionstateExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table interactionstate
     *
     * @mbggenerated Tue Mar 17 17:54:34 CST 2020
     */
    @Delete({
        "delete from interactionstate",
        "where mchId = #{mchId,jdbcType=INTEGER}",
          "and bizKey = #{bizKey,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(interactionstateKey key);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table interactionstate
     *
     * @mbggenerated Tue Mar 17 17:54:34 CST 2020
     */
    @Insert({
        "insert into interactionstate (mchId, bizKey, ",
        "bizValues, createTime, ",
        "updateTime)",
        "values (#{mchId,jdbcType=INTEGER}, #{bizKey,jdbcType=VARCHAR}, ",
        "#{bizValues,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, ",
        "#{updateTime,jdbcType=TIMESTAMP})"
    })
    int insert(interactionstate record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table interactionstate
     *
     * @mbggenerated Tue Mar 17 17:54:34 CST 2020
     */
    @InsertProvider(type=interactionstateSqlProvider.class, method="insertSelective")
    int insertSelective(interactionstate record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table interactionstate
     *
     * @mbggenerated Tue Mar 17 17:54:34 CST 2020
     */
    @SelectProvider(type=interactionstateSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="mchId", property="mchId", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="bizKey", property="bizKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="bizValues", property="bizValues", jdbcType=JdbcType.VARCHAR),
        @Result(column="createTime", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="updateTime", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<interactionstate> selectByExample(interactionstateExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table interactionstate
     *
     * @mbggenerated Tue Mar 17 17:54:34 CST 2020
     */
    @Select({
        "select",
        "mchId, bizKey, bizValues, createTime, updateTime",
        "from interactionstate",
        "where mchId = #{mchId,jdbcType=INTEGER}",
          "and bizKey = #{bizKey,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="mchId", property="mchId", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="bizKey", property="bizKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="bizValues", property="bizValues", jdbcType=JdbcType.VARCHAR),
        @Result(column="createTime", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="updateTime", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    interactionstate selectByPrimaryKey(interactionstateKey key);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table interactionstate
     *
     * @mbggenerated Tue Mar 17 17:54:34 CST 2020
     */
    @UpdateProvider(type=interactionstateSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") interactionstate record, @Param("example") interactionstateExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table interactionstate
     *
     * @mbggenerated Tue Mar 17 17:54:34 CST 2020
     */
    @UpdateProvider(type=interactionstateSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") interactionstate record, @Param("example") interactionstateExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table interactionstate
     *
     * @mbggenerated Tue Mar 17 17:54:34 CST 2020
     */
    @UpdateProvider(type=interactionstateSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(interactionstate record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table interactionstate
     *
     * @mbggenerated Tue Mar 17 17:54:34 CST 2020
     */
    @Update({
        "update interactionstate",
        "set bizValues = #{bizValues,jdbcType=VARCHAR},",
          "createTime = #{createTime,jdbcType=TIMESTAMP},",
          "updateTime = #{updateTime,jdbcType=TIMESTAMP}",
        "where mchId = #{mchId,jdbcType=INTEGER}",
          "and bizKey = #{bizKey,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(interactionstate record);
}